package org.fatmansoft.teach.models;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.*;

@Entity
@Data
@Table(	name = "student_log",      //表”student_log“的实体类
        uniqueConstraints = {
        })
public class StudentLog {
    @ManyToOne
    @JoinColumn(name = "student_id")    //外键student_id，存了对应student对象
    private Student student;

    private Integer log_type;    //1：消费记录 2：请假信息

    private String reason;  //请假或花钱原因

    private String date;    //请假或花钱日期

    private Double cost;    //花钱金额

    private Integer code;    //审核状态码。0（未审核）、1（审核通过）、2（审核未通过）
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer studentLogId; // 主键字段

}
